<template>
  <div>
    <h2>{{ money }}</h2>
    <button @click="fo">-5</button>
  </div>
</template>

<script>
export default {
  props: {
    money: {
      type: Number,
      required: true
    },
    fn: {
      type: Function,
      default: () => {}
    }
  },
  data() {
    return {
    }
  },
  methods: {
    fo() {
      //   this.$emit('fn', this.money - 5)
      this.fn({
        results: [{ name: 1, id: 1 }, { name: 2, id: 2 }],
        data: [1, 2, 3, 4]
      })
      this.$emit('update:money', this.money - 5)
    }
  }
}
</script>

<style>

</style>
